﻿using System;
using System.Collections.Generic;
using System.Linq.Expressions;

namespace CloudPms.Domain.Interface
{
    public interface IRepository<T> where T: class, new()
    {
        T Create(string hotelId);

        T Insert(string hotelId,T entity);

        T Update(string hotelId,T entity);

        T Get(string hotelId,params object[] keyValues);

        T Get(string hotelId, Expression<Func<T, bool>> exp);

        void Delete(string hotelId,T entity);

        void BatchInsert(string hotelId,IEnumerable<T> entities);

        void BatchUpdate(string hotelId,IEnumerable<T> entities);

        void BatchDelete(string hotelId,IEnumerable<T> entities);

        List<T> BatchGet(string hotelId, Expression<Func<T, bool>> exp);

        List<T> GetAll(string hotelId);
    }
}
